#pragma once

class CModuleTreeWindow : public CWindowBase
{
	typedef std::map<DWORD,HTREEITEM>	MAP_HTREEITEM_BY_PARAM;

public:
	CModuleTreeWindow();
	virtual ~CModuleTreeWindow();

	bool Create(HINSTANCE hInstance,HWND hParentWnd,UINT nID);
	void Release();

	HTREEITEM InsertItem( LPCTSTR szItem,HTREEITEM hParent = TVI_ROOT,DWORD dwParam = 0,int imageIndex = 0);
	HTREEITEM FindItem(DWORD dwParam);

	sModule*			GetModule(HTREEITEM hItem);
	sModuleVersion*		GetModuleVersion(HTREEITEM hItem);

	void	DeleteAllItems();

protected:
	HIMAGELIST				m_hImageList;
	MAP_HTREEITEM_BY_PARAM	m_TreeItemMap;
};